package com.storage.system.mapper;

import com.storage.system.domain.StorageShop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 店铺 数据层
 *
 * @author storage
 * @date 2019-08-18
 */
public interface StorageShopMapper {
    /**
     * 查询店铺信息
     *
     * @param id 店铺ID
     * @return 店铺信息
     */
    public StorageShop selectStorageShopById(Long id);

    /**
     * 查询店铺列表
     *
     * @param storageShop 店铺信息
     * @return 店铺集合
     */
    public List<StorageShop> selectStorageShopList(StorageShop storageShop);

    /**
     * 新增店铺
     *
     * @param storageShop 店铺信息
     * @return 结果
     */
    public int insertStorageShop(StorageShop storageShop);

    /**
     * 修改店铺
     *
     * @param storageShop 店铺信息
     * @return 结果
     */
    public int updateStorageShop(StorageShop storageShop);

    /**
     * 删除店铺
     *
     * @param id 店铺ID
     * @return 结果
     */
    public int deleteStorageShopById(Long id);

    /**
     * 批量删除店铺
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteStorageShopByIds(String[] ids);

    /**
     * 根据店铺名称查询店铺count
     *
     * @param shopName
     * @return
     */
    int selectStorageShopCountByName(@Param("shopName") String shopName, @Param("createUserId") Long createUserId);

    /**
     * 查询分页数据
     *
     * @param storageShop
     * @param start
     * @param pageSize
     * @return
     */
    List<StorageShop> queryPageList(@Param("shop") StorageShop storageShop, @Param("start") Integer start, @Param("pageSize") Integer pageSize);

    /**
     * 查询分页count
     *
     * @param storageShop
     * @return
     */
    Long queryPageCount(StorageShop storageShop);
}